package cn.laixueit.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.ModelAndView;

@RestControllerAdvice
public class MyExceptionResolver  {

    @ExceptionHandler(Exception.class)
    public ModelAndView fileuploadException(){
        ModelAndView mv = new ModelAndView("error");
        System.out.println("student");
        return mv;
    }

   /* @Override
    public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
        ModelAndView mv = new ModelAndView("student");
        System.out.println("student");
        return mv;
    }
    */
}
